//package com.utils.failureanalysis.controller;
//
//import com.utils.failureanalysis.data.dao.Journal;
//import com.utils.failureanalysis.data.dao.JournalRepository;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Controller;
//import org.springframework.ui.Model;
//import org.springframework.web.bind.annotation.RequestMapping;
//
//@Controller
//public class JournalController {
//    @Autowired
//    private JournalRepository repo;
//
//    @RequestMapping("/h2")
//    public String index(Model model) throws Exception {
//        repo.save(new Journal("code study 1","my first database study","07/12/2018"));
//        repo.save(new Journal("code study 2","my sec database study","07/12/2018"));
//        model.addAttribute("journal", repo.findAll());
//        System.out.println(repo.findAll());
//        return "h2.html";
//    }
//}
